From: Andrew Cooper Date: Mon, 27 Mar 2017 09:37:35 +0000 (+0100) Subject: tools/insn-fuzz: Provide IA32_DEBUGCTL consistently to the emulator X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2304 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=9e9b56fe8aab1f9376acdbbac575b97b7a4e8df9;p=xen.git tools/insn-fuzz: Provide IA32_DEBUGCTL consistently to the emulator x86_emulates()'s is_branch_step() performs a speculative read of IA32_DEBUGCTL, but doesn't squash exceptions should they arise. In reality, this MSR is always available. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c index 10501d96c0..9544aa42b9 100644 --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c @@ -402,7 +402,8 @@ enum { MSRI_STAR, MSRI_LSTAR, MSRI_CSTAR, - MSRI_SYSCALL_MASK + MSRI_SYSCALL_MASK, + MSRI_IA32_DEBUGCTLMSR, }; static const unsigned int msr_index[MSR_INDEX_MAX] = { @@ -413,7 +414,8 @@ static const unsigned int msr_index[MSR_INDEX_MAX] = { [MSRI_STAR] = MSR_STAR, [MSRI_LSTAR] = MSR_LSTAR, [MSRI_CSTAR] = MSR_CSTAR, - [MSRI_SYSCALL_MASK] = MSR_SYSCALL_MASK + [MSRI_SYSCALL_MASK] = MSR_SYSCALL_MASK, + [MSRI_IA32_DEBUGCTLMSR] = MSR_IA32_DEBUGCTLMSR, }; static int fuzz_read_msr(